package com.tencent.sr.iris.basic.saas.service.commonkv;

import com.tencent.sr.iris.basic.saas.dependency.IrisCommonKvConfigDependency;
import com.tencent.sr.iris.basic.service.interfaces.dto.TCommonKvConfigDTO;
import com.tencent.sr.iris.basic.service.interfaces.request.TCommonKvConfigAddRequest;
import com.tencent.sr.iris.basic.service.interfaces.request.TCommonKvConfigDeleteRequest;
import com.tencent.sr.iris.basic.service.interfaces.request.TCommonKvConfigQueryPageRequest;
import com.tencent.sr.iris.basic.service.interfaces.request.TCommonKvConfigUpdateRequest;
import com.tencent.sr.rmall.common.primitive.HttpResult;
import com.tencent.sr.rmall.common.request.PaginationRequest;
import com.tencent.sr.rmall.common.response.PaginationResponse;
import javax.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * @author xiaojun
 */
@Service
@Slf4j
public class IrisCommonKvConfigService {

    @Resource
    private IrisCommonKvConfigDependency irisCommonKvConfigDependency;

    public HttpResult<Boolean> add(TCommonKvConfigAddRequest request) {
        return irisCommonKvConfigDependency.add(request);
    }

    public HttpResult<Boolean> update(TCommonKvConfigUpdateRequest request) {
        return irisCommonKvConfigDependency.update(request);
    }

    public HttpResult<Boolean> delete(TCommonKvConfigDeleteRequest request) {
        return irisCommonKvConfigDependency.delete(request);
    }

    public HttpResult<PaginationResponse<TCommonKvConfigDTO>> queryCommonKVPage(
            PaginationRequest<TCommonKvConfigQueryPageRequest> page) {
        return irisCommonKvConfigDependency.queryCommonKVPage(page);
    }
}
